#ifndef SEARCHER_H
#define SEARCHER_H

#include "iTube_GUI.h"

#include <wx/xml/xml.h>
#include <vector>

#ifndef _DOWNLOAD_
#define _DOWNLOAD_
#include <wx/socket.h>
#include <wx/stream.h>
#include <wx/file.h>
#include <wx/url.h>

#endif



//make a class that will contain all the video information we need

	class c_Videos 
		{
		public:
			wxArrayString Title;
			wxArrayString Description;
			wxArrayString Url;
			wxArrayString Author;
			std::vector<int> LengthInSeconds;
			wxArrayString ThumbnailUrl;
			std::vector<int> Views;
			std::vector<int> Rating;
		};


class Searcher
	{
	public:
	Searcher(wxString query);
	bool SetQuery(wxString query);
	wxString SearchForVideos();
	wxString SearchForVideos(wxString filename);
	c_Videos GetAllVideoInformation();
	c_Videos AddAuthorsToTitles();
	c_Videos ReturnVideoInformation();
	

	private:
		wxString SearchQuery;
		wxURL RequestUrl;
		wxString SavedSearchName;
		bool SearchComplete;
		wxXmlDocument Results;
		int tempThumbHeight;  //used to compare thumbnail heights to get the biggest one
		c_Videos ReturnInfo;
	};







#endif
